//
//  EViewController.m
//  PresentViewController
//
//  Created by student on 16/2/24.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "EViewController.h"

@interface EViewController ()

@end

@implementation EViewController
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.label.text=[NSString stringWithFormat:@"%i",self.num];
}
- (IBAction)pressed:(id)sender
{
    
    EViewController *vce=[[EViewController alloc]init];
    vce.modalPresentationStyle=UIModalPresentationFullScreen;
    vce.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
    [self presentViewController:vce animated:YES completion:nil];
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.view.backgroundColor=[UIColor colorWithRed:arc4random()%255/255.0 green:arc4random()%255/255.0 blue:arc4random()%255/255.0 alpha:arc4random()%255/255.0];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)press:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
